package com.peng.mybatis.transaction;

import cn.hutool.db.transaction.TransactionLevel;

import javax.sql.DataSource;
import java.sql.Connection;
import java.sql.SQLException;

public interface TransactionFactory {

    Transaction newTransaction(Connection connection) throws SQLException;

    Transaction newTransaction(DataSource dataSource, TransactionLevel level, boolean autoCommit) throws SQLException;

}
